home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / advanc1a / form1.frm < prev    next >
Text File  |  1999-09-05  |  2KB  |  64 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    AutoRedraw      =   -1  'True
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   2460
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   9150
  9.    BeginProperty Font 
  10.       Name            =   "MS Sans Serif"
  11.       Size            =   18
  12.       Charset         =   0
  13.       Weight          =   700
  14.       Underline       =   0   'False
  15.       Italic          =   0   'False
  16.       Strikethrough   =   0   'False
  17.    EndProperty
  18.    LinkTopic       =   "Form1"
  19.    ScaleHeight     =   2460
  20.    ScaleWidth      =   9150
  21.    StartUpPosition =   3  'Windows Default
  22. End
  23. Attribute VB_Name = "Form1"
  24. Attribute VB_GlobalNameSpace = False
  25. Attribute VB_Creatable = False
  26. Attribute VB_PredeclaredId = True
  27. Attribute VB_Exposed = False
  28. Private test As Encryptor
  29.  
  30. Private Sub Form_Load()
  31. Set test = New Encryptor
  32.  
  33. Dim Encrypted As String
  34. Dim Decrypted As String
  35. Encrypted = test.Encrypt("Hello My Name Is Jack !ú$%^&*()", 9)
  36. Form1.Print Encrypted
  37. Decrypted = test.Decrypt(Encrypted, 9)
  38. Form1.Print Decrypted
  39. Encrypted = test.Encrypt("Jack", 128)
  40. Form1.Print Encrypted
  41. Decrypted = test.Decrypt(Encrypted, 128)
  42. Form1.Print Decrypted
  43. Dim Rot As Integer
  44. Randomize Timer
  45. Rot = Rnd * 127
  46. Rot = Int(Rot) + 1
  47. Encrypted = test.Encrypt("This is encrypted using a random number (" & Rot & ")", Rot)
  48. Form1.Print Encrypted
  49. Decrypted = test.Decrypt(Encrypted, Rot)
  50. Form1.Print Decrypted
  51.  
  52. 'Dim JetSon As String
  53. 'JetSon = "Jack"
  54. 'Dim Result As String
  55. 'Dim Code As Integer
  56. 'For i = 1 To Len(JetSon)
  57. 'Result = Mid$(JetSon, i, 1)
  58. 'Code = Asc(Result)
  59. 'MsgBox Result & "(" & Code & ")"
  60. 'Next i
  61. End Sub
  62.  
  63.  
  64.